]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
environment: Don't use actor if an ease callback destroys it
authorMarco Trevisan (Treviño) <mail@3v1n0.net>
Fri, 9 Aug 2019 00:58:28 +0000 (02:58 +0200)
committerFlorian Müllner <florian.muellner@gmail.com>
Fri, 9 Aug 2019 21:00:22 +0000 (21:00 +0000)
An actor ease callback could destroy the actor, in such case we should do not
touch the actor anymore.

So, before calling the callback, reset restore the easing state and don't
perform any further action with it.

Fixes https://gitlab.gnome.org/GNOME/gnome-shell/issues/1507

js/ui/environment.js

index 60d73d9ccb83e905dd8c3320560e1bff71059ac1..0c291b0a20d6f9da499021a0350b04301d49ebfc 100644 (file)
@@ -117,6 +117,7 @@ function _easeActor(actor, params) {
     animatedProps.forEach(p => actor.remove_transition(p));
 
     actor.set(params);
+    actor.restore_easing_state();
 
     if (callback) {
         let transition = actor.get_transition(animatedProps[0]);
@@ -126,8 +127,6 @@ function _easeActor(actor, params) {
         else
             callback(true);
     }
-
-    actor.restore_easing_state();
 }
 
 function _easeActorProperty(actor, propName, target, params) {